Skip to content

Conversation

@shsms
Copy link
Contributor

@shsms shsms commented Jun 6, 2025

No description provided.

Copilot AI review requested due to automatic review settings June 6, 2025 09:44
@shsms shsms requested a review from a team as a code owner June 6, 2025 09:44
@github-actions github-actions bot added the part:tests Affects the unit, integration and performance (benchmarks) tests label Jun 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a keys() method to LatestValueCache to expose the set of keys for which messages have been received and includes integration tests verifying its behavior.

  • Introduces keys() on LatestValueCache with a docstring and return type.
  • Adds assertions in integration tests to validate keys() before and after messages arrive.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/test_latest_value_cache_integration.py Added assert cache.keys() == ... checks around message sends and error cases
src/frequenz/channels/_latest_value_cache.py Imported Set and implemented keys() returning the internal keys view
Comments suppressed due to low confidence (1)

src/frequenz/channels/_latest_value_cache.py:154

  • The method is annotated to return a Set but returns a dict_keys view; consider converting to a built-in set (e.g., return set(self._latest_value_by_key.keys())) to match the annotation or update the return type to reflect the actual view type.
return self._latest_value_by_key.keys()

@shsms shsms added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Jun 6, 2025
@shsms
Copy link
Contributor Author

shsms commented Jun 6, 2025

No release notes because this is an enhancement to an unreleased feature.

@shsms shsms added this pull request to the merge queue Jun 6, 2025
Merged via the queue into frequenz-floss:v1.x.x with commit 6f24b25 Jun 6, 2025
5 of 6 checks passed
@shsms shsms deleted the expose-keys branch June 6, 2025 11:15
shsms added a commit to shsms/frequenz-channels-python that referenced this pull request Jun 16, 2025
shsms added a commit to shsms/frequenz-channels-python that referenced this pull request Jun 16, 2025
…ceived (frequenz-floss#425)"

This reverts commit 6f24b25, reversing
changes made to 3edcb49.

Signed-off-by: Sahas Subramanian <[email protected]>
@llucax llucax added this to the v1.10.0 milestone Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants